<?xml version="1.0" encoding="UTF-8"?>

<definitions id="definitions" 
  xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
  xmlns:camunda="http://camunda.org/schema/1.0/bpmn"
  targetNamespace="Examples">
  
  <process id="executionAndTaskListenerDelegation" isExecutable="true">
  
   <startEvent id="start" />
    <sequenceFlow id="flow1" sourceRef="start" targetRef="userTask" />
    
    <userTask id="userTask" name="Schedule meeting">
      <extensionElements>
        <camunda:executionListener event="start" delegateExpression="${myExecutionListenerBean}">
          <camunda:field name="someField" stringValue="executionListenerInjection"/>
        </camunda:executionListener>
        <camunda:taskListener event="create" delegateExpression="${myTaskListenerBean}">
          <camunda:field name="someField" stringValue="taskListenerInjection"/>
        </camunda:taskListener>
      </extensionElements>
    </userTask>
    <sequenceFlow id="flow3" sourceRef="userTask" targetRef="end" />
    
    <endEvent id="end" />
    
  </process>

</definitions>